package com.wuyan.locationdog.adapter

import android.widget.ImageView
import android.widget.TextView
import androidx.annotation.LayoutRes
import com.arcsoft.commonbase.bean.ServiceListBeanContent
import com.arcsoft.commonbase.ext.loadImageCircle
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.wuyan.locationdog.R


class ServiceListAdapter(@LayoutRes layoutResId: Int, data: MutableList<ServiceListBeanContent>?) :
    BaseQuickAdapter<ServiceListBeanContent, BaseViewHolder>(layoutResId, data) {


    override fun convert(holder: BaseViewHolder, item: ServiceListBeanContent) {
        holder.apply {

            getView<TextView>(R.id.commodityName).text = item.commodityName

            getView<TextView>(R.id.description).text = item.description
            getView<ImageView>(R.id.ivHead).loadImageCircle(item.commodityPhotoList.first().fileUrl)


        }
    }
}


